//
//  WeiboBaseViewController.swift
//  SinaWeibo
//
//  Created by 风不会停息 on 2016/11/13.
//  Copyright © 2016年 风不会停息. All rights reserved.
//

import UIKit

class WeiboBaseViewController: UIViewController,WeiboVisitorViewDelegate {

//    var islogin = WBUserAccountViewModel.WBUserAccountShared.loaduserInfo() != nil
    var islogin = WBUserAccountViewModel.WBUserAccountShared.isloginIN

    
    lazy var visitorView:WeiboVisitorView = WeiboVisitorView()
    
    override func loadView() {
        if islogin {
            super.loadView()

        }else{

            visitorView.delegate = self
            self.view = visitorView
        }
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    func userRegister() {
        print("注册")
    }
    func userLogin() {
        let OAuthVC = WBOAuthController()
        let nav = WeiboBaseNavController(rootViewController: OAuthVC)
//        self.navigationController?.present(nav, animated: true, completion: nil)
        self.present(nav, animated: true, completion: nil)
    }

}
